 function starArr(score){
    const arr = [];
    //找on的个数
    const onNum = Math.floor(score)
    for(let i = 0; i < onNum; i++){
        arr.push("on")
    }
    if(Math.floor(score) !== Math.ceil(score)){
        arr.push("self")
    }
    const length = arr.length;
    for(let offNum = 0; offNum < 5 - length; offNum++){
    arr.push("off")
    }
    return arr
}

console.log(starArr(3.3));

let arr = [1,23,4,5,6,7,8,9]
const arr1 = arr.filter(item=>item > 5)
console.log('====================================');
console.log(arr);
console.log(arr1);
console.log('====================================');



